package com.robot.coupon.pojo.client;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * member实体类
 *
 * @author lin
 */
@Entity
@Table(name = "member")
public class Member implements Serializable {
    /**
     * 会员id
     */
    @Id
    private String id;
    /**
     * 电话
     */
    private String phone;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 昵称-默认取微信昵称
     */
    private String nickname;
    /**
     * 密码
     */
    private String password;
    /**
     * 头像-默认微信头像
     */
    private String avatar;
    /**
     * 是否plus会员
     */
    private String isPlus;
    /**
     * plus会员开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plusStart;
    /**
     * plus会员结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plusEnd;
    /**
     * 性别 0-女 1-男 2-未知
     */
    private String sex;
    /**
     * 身份证号码
     */
    private String idCard;
    /**
     * 身份证国徽页
     */
    private String idCardFront;
    /**
     * 身份证信息页
     */
    private String idCardBack;
    /**
     * 真实姓名
     */
    private String realName;
    /**
     * 实名制状态 0-未实名 1-已实名 2-实名失败
     */
    private String realNameStatus;
    /**
     * 生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime birthday;
    /**
     * 最后登录ip
     */
    private String lastLoginIp;
    /**
     * 最后登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;
    /**
     * 购买的金豆
     */
    private int goldenBeans;
    /**
     * 码豆
     */
    private int beans;
    /**
     * 累计持有码豆
     */
    private int totalBeans;
    /**
     * 累计下单并支付成功的订单数
     */
    private int totalOrders;
    /**
     * 总共节省金额
     */
    private BigDecimal totalSave;
    /**
     * 推荐人id
     */
    private String recommendId;
    /**
     * 推荐人名称
     */
    private String recommendName;
    /**
     * 微信open_id
     */
    private String openId;
    /**
     * 微信union_id
     */
    private String unionId;
    /**
     * 注册日的年
     */
    private String year;
    /**
     * 注册日的月
     */
    private String month;
    /**
     * 注册日的日期
     */
    private String date;
    /**
     * 注册日的星期
     */
    private String day;
    /**
     * 注册时间的小时数
     */
    private String hours;
    /**
     * 来源
     */
    private String comeForm;
    /**
     * 状态 0-禁用 1-启用
     */
    private String status;
    /**
     * 关注微信公众号时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime subscribeAt;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    /**
     * 最后更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deletedAt;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getIsPlus() {
        return isPlus;
    }

    public void setIsPlus(String isPlus) {
        this.isPlus = isPlus;
    }

    public LocalDateTime getPlusStart() {
        return plusStart;
    }

    public void setPlusStart(LocalDateTime plusStart) {
        this.plusStart = plusStart;
    }

    public LocalDateTime getPlusEnd() {
        return plusEnd;
    }

    public void setPlusEnd(LocalDateTime plusEnd) {
        this.plusEnd = plusEnd;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getIdCardFront() {
        return idCardFront;
    }

    public void setIdCardFront(String idCardFront) {
        this.idCardFront = idCardFront;
    }

    public String getIdCardBack() {
        return idCardBack;
    }

    public void setIdCardBack(String idCardBack) {
        this.idCardBack = idCardBack;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getRealNameStatus() {
        return realNameStatus;
    }

    public void setRealNameStatus(String realNameStatus) {
        this.realNameStatus = realNameStatus;
    }

    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public int getGoldenBeans() {
        return goldenBeans;
    }

    public void setGoldenBeans(int goldenBeans) {
        this.goldenBeans = goldenBeans;
    }

    public int getBeans() {
        return beans;
    }

    public void setBeans(int beans) {
        this.beans = beans;
    }

    public int getTotalBeans() {
        return totalBeans;
    }

    public void setTotalBeans(int totalBeans) {
        this.totalBeans = totalBeans;
    }

    public int getTotalOrders() {
        return totalOrders;
    }

    public void setTotalOrders(int totalOrders) {
        this.totalOrders = totalOrders;
    }

    public BigDecimal getTotalSave() {
        return totalSave;
    }

    public void setTotalSave(BigDecimal totalSave) {
        this.totalSave = totalSave;
    }

    public String getRecommendId() {
        return recommendId;
    }

    public void setRecommendId(String recommendId) {
        this.recommendId = recommendId;
    }

    public String getRecommendName() {
        return recommendName;
    }

    public void setRecommendName(String recommendName) {
        this.recommendName = recommendName;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public String getHours() {
        return hours;
    }

    public void setHours(String hours) {
        this.hours = hours;
    }

    public String getComeForm() {
        return comeForm;
    }

    public void setComeForm(String comeForm) {
        this.comeForm = comeForm;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getSubscribeAt() {
        return subscribeAt;
    }

    public void setSubscribeAt(LocalDateTime subscribeAt) {
        this.subscribeAt = subscribeAt;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(LocalDateTime deletedAt) {
        this.deletedAt = deletedAt;
    }

    @Override
    public String toString() {
        return "Member{" +
                "id='" + id + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", nickname='" + nickname + '\'' +
                ", password='" + password + '\'' +
                ", avatar='" + avatar + '\'' +
                ", isPlus='" + isPlus + '\'' +
                ", plusStart=" + plusStart +
                ", plusEnd=" + plusEnd +
                ", sex='" + sex + '\'' +
                ", idCard='" + idCard + '\'' +
                ", idCardFront='" + idCardFront + '\'' +
                ", idCardBack='" + idCardBack + '\'' +
                ", realName='" + realName + '\'' +
                ", realNameStatus='" + realNameStatus + '\'' +
                ", birthday=" + birthday +
                ", lastLoginIp='" + lastLoginIp + '\'' +
                ", lastLoginTime=" + lastLoginTime +
                ", goldenBeans=" + goldenBeans +
                ", beans=" + beans +
                ", totalBeans=" + totalBeans +
                ", totalOrders=" + totalOrders +
                ", totalSave=" + totalSave +
                ", recommendId='" + recommendId + '\'' +
                ", recommendName='" + recommendName + '\'' +
                ", openId='" + openId + '\'' +
                ", unionId='" + unionId + '\'' +
                ", year='" + year + '\'' +
                ", month='" + month + '\'' +
                ", date='" + date + '\'' +
                ", day='" + day + '\'' +
                ", hours='" + hours + '\'' +
                ", comeForm='" + comeForm + '\'' +
                ", status='" + status + '\'' +
                ", subscribeAt=" + subscribeAt +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", deletedAt=" + deletedAt +
                '}';
    }
}
